UniqueID
UniqueID Get unique resource ID (before adding a resource)
#include <Resources.h> Resource Manager
short UniqueID(rType );
ResType rType ; 4-byte resource type; e.g., 'MENU'
returns a unique, unused resource ID
UniqueID returns a unique, unused resource ID that will not collide with any
resource of the specified type in any open resource file.
rType is a 4-byte ResType value. It identifies the resource type for which
you wish a unique resource ID (e.g., 'FONT', 'WIND', etc.)
Returns: an integer; a resource ID number that is unique with respect to all
resources of type rType in all currently-open resource files.

Notes: UniqueID and Unique1ID are used by applications that create resources;
especially temporary resources that are removed when the program
terminates. After making this call, you can safely add to the resource list,
e.g.,:
newID = UniqueID( 'MENU' );
AddResource( myHand, 'MENU', newID, "\pMy New Menu" );
To avoid colliding with IDs of ROM-based resources (i.e., get a truly
unique ID), set the RomMapInsert flag directly before calling:
RomMapInsert = mapTrue;
newID = UniqueID( 'MENU' );
See GetResource for information about ROM-based resources.
This call may return IDs less than 128 which, by convention, are reserved
for system resources. Just call it again until you get an ID greater than
127.